﻿{extends file='layout.html5.tpl'}
{block name=head}
		<link rel="stylesheet" href="{$contextpath}/css/style.css" type="text/css">	
		{if $currentRole=="PUBLIC"}<script src="public/js/login.js" type="text/javascript"></script>{/if}
{/block}
{block name=body}
	<div id="contener">
		<div id="header">
			<div id="logo" class="left">
				<a href="#"><img src="{$contextpath}/img/logo.jpg" /></a>
			</div>
			<div id="titre" class="right">
				<img src="{$contextpath}/img/titre.jpg" />
			</div>
			<div class="clear">
				<img src="{$contextpath}/img/entete/{1|rand:4}.jpg" alt=""/>
			</div>
		</div>

		<div id="content">
			<div id="menu" class="left">
				<ul>
					{foreach $metadata->values as $meta} 
						<li class="grand bouton {$meta['css']['link_class']}">
							<a href="{$meta@key}" title="{$meta['meta']['title']}">{$meta['meta']['link_title']}</a>
						</li>
					{/foreach}
				</ul>
				{include file='facebook.tpl'}
			</div>
		
		
			<div id="contenu" class="left">
				{has_role role="USER"}
					<div class="editapplication right">
						<a href="#" class="buttoneditcontent"><img src="{$contextpath}/img/application_form_edit.png" /></a>
					</div>
				{/has_role}
				
				<div id="texte">
					{if isset($content->slider['type']) && $content->slider['type'] != "aucun" }
						{include file="slider.{$content->slider['type']}.tpl"}
					{/if}
					{$content->text}
				</div>
				{if $site['contact_page']|default:"non" == 'oui' && $content->content_name == 'contact'}
					{include file='contact.tpl'}
				{/if}
			</div>
		</div>
		
		<div id="footer" class="">
			<hr/>	
			{if isset($metadata->values['index']['site_information']['footer_text'])}
				{$metadata->values['index']['site_information']['footer_text']}
			{/if}
			<br/>
			{if $currentRole=="PUBLIC"}
				<div>
					<div id="topnav" class="topnav">
						<a href="login" class="signin">
							<span>
								<img src="{$contextpath}/img/door_in.png" class="link_img" alt="Connexion" />Se connecter
							</span>
						</a> 
					</div>
					  <fieldset id="signin_menu">
						<form action="login" method="POST">
							<label for="login">Login</label>
							<input type="text" id="login" name="login" value="localhost" />
							<label for="password">Password</label>
							<input type="password" id="password" name="password" value="i-s$57" />
							<input type="submit" value="Se connecter" />
						</form>
					</fieldset>
				</div>
			{else}
				<a href="disconnect">
					<img src="{$contextpath}/img/door_out.png" class="link_img" alt="Deconnexion" />Se déconnecter</a>
			{/if}
		</div>
	</div>
{/block}
